package com.cy.system.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cy.system.entity.Dept;
import com.cy.system.mapper.DeptMapper;
import com.cy.system.service.DeptService;

@Service
public class DeptServiceImpl implements DeptService {
	@Resource
	DeptMapper deptMapper;

	@Override
	public int addDept(Dept dept) {
		dept.setUpdateDate(new Date());
		return deptMapper.addDept(dept);
	}

	@Override
	public int deleteDept() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateDept() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Dept getDeptByDeptId(int deptId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Dept> getAllDept() {
	
		return deptMapper.getAllDept();
	}

}
